package bruce.listener.controller;

import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @service
 * @description
 * @author: Bruce
 * @create: 2019-12-27
 **/
@RestController
public class DemoController {

    @GetMapping("/index")
    public String index(String data){
        if(StringUtils.isEmpty(data)) {
            data="hello spring-cloud-study";
        }
        return data;
    }

}
